The performance characteristics of a computer depend largely on the speed with which the software programs are executed. Although fast hardware increases program execution speed, performance increases can often be realized by optimizing the program code itself. Such optimization involves writing programs to execute efficiently and to take full advantage of available hardware resources. The performance of a particular program depends largely on the specific implementation or computer environment for which it is written, however performance bottlenecks that degrade performance may involve one or more common problems. These problems include useless computation produced by code that has been refined but not removed, needless re-computation caused by program modules that recompute values rather than storing results for later use, excessive or unnecessary requests for services that waste time on the service and incur large context switch times, and waiting for services requests to complete.
These bottlenecks provide opportunities for software engineers to increase program execution performance. For example, reducing the number of service or subprogram calls, or eliminating useless calls entirely may effectively reduce the bottlenecks associated with unnecessary computations. Likewise, caching a result for later reuse prevents the need to re-execute an operation.
Optimization of software code to increase program execution performance thus requires an accurate diagnosis and identification of the problems contributing to the execution bottlenecks. Although such diagnosis could be undertaken by a skilled programmer who can study the code to identify potential problem areas, this is an unrealistic approach for most computer programs. Manual processes for diagnosing program execution, such as timing how long a specific region of code takes to execute (either with a hand-held stopwatch, or by inserting additional software to read the computer's timer at places of interest), or by observing external indicators controlled by the software (alarms, LED indicators, etc.), are also available. Though effective, these techniques may be very tedious, since they require manual modification of the source code, and require a great deal of user attention. These constraints become greatly limiting on larger programs as the amount of information generated may become overwhelming. Furthermore, these manual methods provide no visibility into the internal operation of the software unless they have some external manifestation.
Most computer programs are complex structures involving hundreds of thousands of lines of code with nested operations, subroutines, and calls to various system resources. Furthermore, sophisticated programs are typically written in high level languages (e.g., Pascal, C, C++) that hide implementation details from the user. These make the performance implications of code writing much less apparent to the programmer. Thus, the programmer typically has very little insight into the performance characteristics of program code as it is being written. Furthermore, very few tools are available which allow a programmer to analyze the performance of the program after it is written to pinpoint specific bottlenecks in program execution. The software tools that are presently available to help an engineer analyze the execution of a particular section of code generally involve taking a statistical sampling and accumulating the total amount of time a program spends in specific sub-routines. Although these methods may accurately show the total amount of time a program spent in a sub-routine, they do not allow the programmer to observe the sequencing of operations and the relationships among hierarchical programs and subroutines. Also, these methods provide no straightforward insight into the coordination of multiple, cooperating processes. These sequences and hierarchical relationships are especially important when the software is controlling external instrumentation, as in industrial control or embedded system software. Furthermore, these methods generally require the recompiling or rebuilding of the software, which may be a very tedious and time-consuming task.
Although the problems described with regard to present software analysis programs apply generally to all computer software, the performance and bottleneck problems are especially acute in test program applications. Test programs, such as those used in Very Large Scale Integrated (VLSI) device test machines involve often complex hierarchical routines for the testing of various devices and operating parameters. Because test costs are often a large portion of the cost of integrated circuit devices, tests that take a long time to execute because of bottlenecks in the test code may add significantly to the cost of these devices.